//Copyright (c) 2006-2007 Microsoft Corporation.  All rights reserved
using System;
using System.Collections;

namespace InvocationFramework.Common
{
    /// <summary>
    /// Clase para guardar informacion de contexto que los adaptadores quieran enviar fuera de banda
    /// </summary>
    /// <author>Rodolfo Finochietti 29/11/2005 21.55</author>
    [Serializable]
    [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1035:ICollectionImplementationsHaveStronglyTypedMembers" )]
    public class ContextDictionary : DictionaryBase
    {
        #region Properties

        /// <summary>
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public object this[ string key ]
        {
            get
            {
                return Dictionary[ key ];
            }
            set
            {
                Dictionary[ key ] = value;
            }
        }

        /// <summary>
        /// </summary>
        public ICollection Keys
        {
            get
            {
                return ( Dictionary.Keys );
            }
        }

        /// <summary>
        /// </summary>
        public ICollection Values
        {
            get
            {
                return Dictionary.Values;
            }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        public void Add( string key, object value )
        {
            Dictionary.Add( key, value );
        }

        /// <summary>
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public bool Contains( string key )
        {
            return Dictionary.Contains( key );
        }

        /// <summary>
        /// </summary>
        /// <param name="key"></param>
        public void Remove( string key )
        {
            Dictionary.Remove( key );
        }

        #endregion
    }
}